package com.szrt.java.day20161227.demo01;


import org.junit.Test;

public class RandomDemo {
	
	
	/**
	 * 我首先把11个人都放进去
	 * 
	 * 随机 random *11  floor  取出来。
	 * @throws Exception
	 */
	@Test
	public void randomTest() throws Exception {
		
		String[] class1612 = new String[11];
		class1612[0]="张泽谋";
		class1612[1]="吴荣来";
		
		
		//随机数
		
		//0 1  2 10
		double ran = Math.random();
		System.out.println(ran);
		double len =ran*class1612.length;
		System.out.println(len);
		
		
		double aa = 0.277247493412439;
		
		double f =Math.floor(aa);
		double c =Math.ceil(aa);
		System.out.println(f);
		System.out.println(c);
		
		
	}
	

}
